package com.central.scheduler.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.central.common.model.SuperEntity;

import java.util.Date;

/**
 * @author Tindy
 * @date 2021/11/5
 * @describe
 */
@TableName("sch_alert_plugin_instance")
public class AlertPluginInstance extends SuperEntity {

    /**
     * plugin_define_id
     */
    @TableField(value = "plugin_define_id", updateStrategy = FieldStrategy.NEVER)
    private Long pluginDefineId;

    /**
     * alert plugin instance name
     */
    @TableField("instance_name")
    private String instanceName;

    /**
     * plugin_instance_params
     */
    @TableField("plugin_instance_params")
    private String pluginInstanceParams;

    /**
     * create_time
     */
    @TableField("create_time")
    private Date createTime;

    /**
     * update_time
     */
    @TableField("update_time")
    private Date updateTime;

    public AlertPluginInstance() {
    }

    public AlertPluginInstance(Long pluginDefineId, String pluginInstanceParams, String instanceName) {
        this.pluginDefineId = pluginDefineId;
        this.pluginInstanceParams = pluginInstanceParams;
        this.createTime = new Date();
        this.updateTime = new Date();
        this.instanceName = instanceName;
    }

    public AlertPluginInstance(Long id, String pluginInstanceParams, String instanceName, Date updateDate) {
        setId(id);
        this.pluginInstanceParams = pluginInstanceParams;
        this.updateTime = updateDate;
        this.instanceName = instanceName;
    }

    public long getPluginDefineId() {
        return pluginDefineId;
    }

    public void setPluginDefineId(long pluginDefineId) {
        this.pluginDefineId = pluginDefineId;
    }

    public String getPluginInstanceParams() {
        return pluginInstanceParams;
    }

    public void setPluginInstanceParams(String pluginInstanceParams) {
        this.pluginInstanceParams = pluginInstanceParams;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getInstanceName() {
        return instanceName;
    }

    public void setInstanceName(String instanceName) {
        this.instanceName = instanceName;
    }
}


